Create Procedure sp_Metatype_Equivalences_CleanLinks
AS
BEGIN
	delete from METATYPE_EQUIVALENCES where
	MET_ID not in (SELECT MET_ID FROM METATYPE)
	
	delete from METATYPE_EQUIVALENCES where
	TAR_ID not in (SELECT TAR_ID FROM TARGET)
END